package org.example.springbootproject.controller;

import org.example.springbootproject.pojo.OutGoods;
import org.example.springbootproject.pojo.Outbound;
import org.example.springbootproject.pojo.Result;
import org.example.springbootproject.service.OutboundService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.time.LocalDate;
import java.util.List;


@RestController
@RequestMapping("/outbound")
public class OutboundController {
    @Autowired
    private OutboundService outboundService;

    @GetMapping("/getOutbound")
    public Result<List<Outbound>> getOutbound() {
        List<Outbound> list = outboundService.findOutbound();
        return Result.success(list);
    }

    @PostMapping("/postOutbound")
    public Result postOutbound(@RequestBody OutGoods outGoods) {
        return outboundService.upDate(outGoods);
    }
}
